package dao;

import org.springframework.jdbc.core.JdbcTemplate;

import entity.User;

public class UserJDBCDao implements UserDao {

	JdbcTemplate jdbctmp;
	
	public JdbcTemplate getJdbctmp() {
		return jdbctmp;
	}

	public void setJdbctmp(JdbcTemplate jdbctmp) {
		this.jdbctmp = jdbctmp;
	}

	public void insertUser(User user) {
		Object obj[] = {user.getName(),user.getSex(),user.getAge(),user.getDid()};
		jdbctmp.update("insert into user (name,sex,age,did) values (?,?,?,?)",obj);
	}

}
